package com.dd.cloud.user.entity.drugs;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 药品出库记录表
 * </p>
 *
 * @author czg
 * @since 2022-05-09
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "药品出库记录表")
public class DrugsOutbound implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 中药模型表 记录中药材的基本情况
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;

    /**
     * 药房id
     */
    @Column(comment = "药房id")
    private Integer pharId;

    /**
     * 处方编码
     */
    @Column(length = 20, comment = "处方编码")
    private String tencode;

    /**
     * 药材名称
     */
    @Column(length = 20, comment = "药材名称")
    private String herbName;

    /**
     * 药材编码
     */
    @Column(length = 20, comment = "药材编码")
    private String drugnum;

    /**
     * 用法及注意事项
     */
    @Column(length = 20, comment = "订单编号")
    private String orderNo;

    /**
     * 药材单位
     */
    @Column(length = 10, comment = "单位")
    private String useUnit;

    /**
     * 状态 1有效 2禁用 -1删除
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "状态 1有效 2禁用 -1删除")
    private Integer status;

    /**
     * 药材单价
     */
    @Column(decimalLength = 2, comment = "销售单价 分/单位")
    private BigDecimal price;

    /**
     * 入库金额
     */
    @Column(decimalLength = 2, comment = "出库金额")
    private BigDecimal outboundPrice;

    /**
     * 操作人id-创建人id
     */
    @Column(comment = "操作人id")
    private Integer operId;

    /**
     * 入库数量
     */
    @Column(comment = "出库数量")
    private BigDecimal outQty;

    /**
     * 创建日期
     */
    @Column(comment = "创建日期")
    private LocalDateTime createDate;

}
